<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="title" content="项目概览">
    <meta name="keyword" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <title>项目概览</title>
    <script src="../js/res.js" type='text/javascript'></script>
    <script src="kityminder.edit.js?_=1432798997088" charset="utf-8"></script>
    <script src="kityminder.config.js?_=1432798997088" charset="utf-8"></script>
    <script src="lang/zh-cn/zh-cn.js?_=1432798997088" charset="utf-8"></script>
    <script src="../js/core/uploadify.js"></script>
    <script src="../js/core.js" type='text/javascript'></script>
    <script src="../js/project.js" type='text/javascript'></script>
    <script src="../js/course.js" type='text/javascript'></script>    
    
    <link href='../css/core/bootstrap.css' media='all' rel='stylesheet' type='text/css' />
    <link href="ui/theme/default/css/default.all.css?_=1432798997088" type="text/css" rel="stylesheet" />
    <link href='../css/core/light-theme.css' id='color-settings-body-color' media='all' rel='stylesheet' type='text/css' />
    <link href="../css/uploadify.css" type="text/css" rel="stylesheet" />
    <link href="../css/base.css" type="text/css" rel="stylesheet" />

    <link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
    <link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed">
</head>

<body>
<div id="content-wrapper">
    <div id="panel"></div>

    <div id="kityminder" onselectstart="return false">
        
    </div>
</div>
</body>

<!--脑图启动代码-->
<script>

$(function() {
    zip.inflateJSPath = 'lib/inflate.js';
});

km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);

km.initUI();
if(getValue("id")){
    $ajax({
        url: "/project/detail",
        data:{
            _id: getValue("id")
        },
        success: function(res){
            var json = res.result;
            json.template = "default";
            json.theme = "fresh-blue";
            json.version = "1.3.5";

            Project.data = json;
            km.importJson(json);
        }
    });
} else {
    var json = '{"name":"' + GetLS("kityName") + '","template":"default","theme":"fresh-blue","version":"1.3.5"}';
    json = JSON.parse(json);
    km.importJson(json);
}    
$("#main-menu-btn").click(function(){ 
    var data = km.exportJson();
    // return alert(JSON.stringify(km.exportJson()));
    $ajax({
        url: "/project/upsert",
        data: data,
        success: function(res){
            alert("编辑成功～");
        }
    });
});

</script>

</html>